﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Project
{
    public partial class SearchClient : Form
    {
        DataTable dt;

        public SearchClient()
        {
            InitializeComponent();
            dt = new DataTable();
        }

        private void btn_back_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btn_all_Click(object sender, EventArgs e)
        {
            dt = Clients.showAllClients();
            dgv_data.DataSource = dt;
        }

        private void btn_search_Click(object sender, EventArgs e)
        {
            dt = Clients.searchClient(txt_id.Text);
            dgv_data.DataSource = dt;
        }
    }
}
